<article id="post_type-view" class="post_type_<%= @post_type.slug %>">
    <%= render partial: 'partials/breadcrumb', locals: {breadcrumb: @post_type.the_breadcrumb } %>
    <h1><%= @post_type.the_title %></h1>
    <div class="content">
        <%= raw @post_type.the_content %>
    </div><br><br>

    <% if @categories.present? %>
        <div class="panel panel-primary no-line">
            <div class="panel-heading">Categories</div>
            <div class="panel-body">
                <%= render partial: "partials/categories_list", locals: {categories: @categories} %>
            </div>
        </div>
    <% end %>

    <div class="panel panel-primary post_list no-line">
        <div class="panel-heading">Content</div>
        <div class="panel-body">
            <div class="row">
                <% @posts.each_with_index do |post, index| %>
                    <%= raw "<div class='clearfix'></div>" if index%3 == 0 && index > 0 %>
                    <%= render partial: 'partials/post_list_item', locals: {post: post.decorate} %>
                <% end %>
            </div>
            <%= content_tag("div", raw(ct('no_contents_found', default: 'No contents found')), class: "alert alert-warning") if @posts.empty? %>
            <%= raw cama_do_pagination(@posts) %>
        </div>
    </div>

</article>


